In the embedded device environment, a hardware independent processor such as a Java Virtual Machine is often installed on the device to allow a program to be downloaded and executed on the device. Such a system allows a program written in a hardware independent language such as Sun MicroSystem""s Java(copyright) to be downloaded to any hardware supporting the Java(copyright) environment in order to customize it for a particular use. This customization is often referred to as the xe2x80x9cpersonalityxe2x80x9d of the device. Multiple applications may be running in concert within an embedded device to define the device""s personality. In this way the device can dynamically be made to function in different unique ways. For example, an embedded device such as a refrigerator may be customized to automatically track its contents. Just as the types of food and naming conventions of similar foods may differ from culture to culture, the embedded device refrigerator may be customized to the particular culture of the users by downloading a new personality describing the food types and naming conventions to the Java enabled embedded refrigerator device.
In the embedded device domain, a hardware independent processor such as a Java(copyright) Virtual Machine is installed on the device to allow applications to be downloaded and executed on the device. In order for Java to succeed in the embedded device market, Java programs must be able to execute in a memory constrained environment. Typical embedded devices contain 1 megabyte of memory or less, whereas typical embedded Java environments for these devices are 500K or greater in size. This leaves less than 500K of free memory for the embedded device""s firmware and for Java programs running on the device. In most cases, embedded Java programs create or use data objects to be shared with other programs on the device, or programs running on other network capable devices. In a memory constrained environment, creating these global data objects using just the Java language capabilities is a daunting task.
The Java language was originally developed for the embedded device environment, allowing a program to execute on any hardware supporting the Java environment. Many Java enabled devices are network ready, supporting Java programs collecting and analyzing data on the device. The device data is then shared with other Java programs on the device, or with other devices on the network. The main problem with implementing this type of Java system is the memory constraints of embedded devices. The Java language does not directly support managing of global data objects within a memory constrained environment. The Java language also does not directly support the loading of data objects to remote devices, thereby allowing more memory to be free on the device for program use.
Currently, there are no known products implementing a standard way of easily sharing global data objects between Java programs on a device in a memory constrained fashion. There are also no known products allowing Java programs to unload data objects onto another device, and reload them onto the original device when needed.
Accordingly, a need exists for a method for allowing data to be stored on other network devices, and then dynamically loaded into the device when needed. A need also exists for a method for allowing data caching beyond the life of a program, thereby allowing other programs to use the same data objects. It would be desirable if the mechanism providing this functionality could be used by all Java capable devices, and did not require a network interface for simple sharing of data between applications on the same device.
The present invention is a novel method and mechanism for allowing data to be stored on remote network devices and dynamically loaded into an embedded device when needed by the embedded device. The mechanism of the invention provides data caching beyond the life of a program, allowing other programs to use the same data objects. The mechanism of the invention can be used by all Java capable devices, and does not require a network interface for simple sharing of data between applications on the same embedded device.
A Java based Data Manager is provided which allows applications to create global data objects in a memory constrained environment. The Data Manager can load Java classes for use by data objects, create the objects, cache the objects, and allow applications to retrieve and store the data objects. The Data Manager performs all these functions under tight memory constraints. When memory on the embedded device becomes full, the Data Manager removes items from its cache to free up memory using a configurable algorithm to determine which items should be removed. Because the Data Manager begins executing when the first Java program runs, the Data Manager can outlive all other programs, and thereby act as a data repository for Java programs. The Data Manager supports the ability to store object data on remote systems, and then retrieve the data at a later time when it is needed. The Data Manager supports API""s to query which objects and classes are being maintained in its caches.